package com.liyk.shop.service.impl;

import com.liyk.shop.domain.entity.Product;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.liyk.shop.dao.ProductDao;
import com.liyk.shop.service.ProductService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Throwable.class)
public class ProductServiceImpl extends BaseServiceImpl<Product,ProductDao> implements ProductService{

    @Resource
    private ProductDao productDao;

    @Override
    public Product getById(String id) {
        return productDao.selectByPrimaryKey(id);
    }

    public List<Product> getList(){
        return productDao.selectAll();
    }

}
